package org.electronic.registration.bo;

/**
 * User: Egor Bondarenko
 * Date: 01/12/11
 */
public enum Departament {
    DIAGNOSTIC("DIAGNOSTIC"),
    SURGERY("SURGERY"),
    OPHTHALMOLOGY("OPHTHALMOLOGY"),
    STOMATOLOGY("STOMATOLOGY"),
    OTOLARYNGOLIST("OTOLARYNGOLIST"),
    RADIOLOGY("RADIOLOGY"),
    CARDIO("CARDIO");


    private String name;

    Departament(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }


    @Override
    public String toString() {
        return name;
    }

    public static Departament fromString(String name) {
        for (Departament departament : Departament.values()) {
            if (departament.toString().equals(name)) {
                return departament;
            }
        }
        return null;
    }
}
